package com.chen.webservice.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@Data
public class CheckOtherProgramCanPlayParameterDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("地标id")
    @NotBlank(message = "地标id不允许为空")
    private String landmarkId;

    @ApiModelProperty("json数据")
    private String data;

    @ApiModelProperty("待插入的广告")
    @NotNull(message = "请上传待插入广告")
    private Order newOrder;

    @ApiModelProperty("商业广告占比")
    private Double businessRate;

    @Valid
    @ApiModelProperty("一天广告数据")
    private List<OneDayOrderData> orderDataList;

    @Data
    public static class OneDayOrderData {
        @ApiModelProperty("开屏时间")
        @NotNull(message = "开屏时间不允许为空")
        private Integer openTime;

        @ApiModelProperty("关屏时间")
        @NotNull(message = "关屏时间不允许为空")
        private Integer closeTime;

        @ApiModelProperty("日期")
        @NotBlank(message = "日期不允许为空")
        private String date;

        @ApiModelProperty("已排好的广告数据")
        private List<Order> orders;

        @Valid
        @ApiModelProperty("安排固定节目")
        private ConfigureParameterDTO.FixProgram fixProgram;

        @ApiModelProperty("是否只排前30分钟广告")
        @NotNull(message = "请选择是否只排前30分钟广告")
        private Boolean onlyArrangeFirst30Minute;
    }
}
